package TCP;

import java.net.ServerSocket;
import java.net.Socket;

public class Serve {
    public static void main(String args[]) throws Exception {
        System.out.println("服务端启动成功");

        //new socket对象
        ServerSocket serversocket=new ServerSocket(8888);


        while(true){

            Socket socket=serversocket.accept();
            System.out.println(socket.getRemoteSocketAddress()+"上线");
            new ServeThread(socket).start();

        }
    }
}
